<template>
	<w-container id='my-page' class='plr-13 pb-20 flex flex-dir-col flex-ai-center   '>
		<image  style="width:320rpx;height: 320rpx;margin-top: 380rpx;" src="/static/bg/network.png" mode=""></image>
		<text class="font-color-white font-size-14">有Wi-Fi的地方,才有诗和远方</text>
		<w-button class='mt-12' size="sm" style="width:280rpx" @click='action'>点击刷新</w-button>
	</w-container>
</template>

<script> 
	import {mapActions} from 'vuex'
	export default {
		data() {
			return {
				
			};
		},
		onLoad() {

		},
		
		methods: {
			...mapActions('config',['checkNetwork','getConfig']),
			action(){
				this.checkNetwork().then(res=>{
					if(res){
						this.getConfig();
						uni.switchTab({
							url:'/pages/index/index'
						})
					}else{
						uni.showToast({
							icon:'error',
							title:'无网络'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	#my-page {
		background-image: url("@/static/bg/my-bg.png");
		background-size: 750rpx auto;
		background-repeat: no-repeat;
		// background-color: #F4F5F9;
		padding-bottom: 88rpx;
		height: 100vh;
	}
</style>
